package Chapter08.OverrideExercise;

/**
 * @author 杨森
 * @date 2022年09月25日 9:53
 */
public class Student extends Person{
    private int id;
    private int score;

    public Student() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public Student(String name, int age, int id, int score) {
        super(name, age);
        this.id = id;
        this.score = score;
    }
    @Override
    public void say(){
        super.say();
        System.out.println("id为"+id+"分数为"+score);
    }
}
